<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    
    <title>后台图片管理</title>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-2.0.0.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-ui"></script>
    <link href="${pageContext.request.contextPath }/css/bootstrap-combined.min.css" rel="stylesheet" media="screen">
	
	<script type="text/javascript">
		function doDelete(id)
    	{
    		if(window.confirm('你确认需要删除吗？'))
    		{
    			window.location.href="${pageContext.request.contextPath}/admin/img_ImgDelete.action?pi.id="+id;
    		}
    		else
    		{
    			
    		}
    		
    		
    	}
    	function doEditor(id)
    	{
    		window.location.href="${pageContext.request.contextPath}/admin/img_ImgeditorUI.action?pi.id="+id;
    	}
    </script>
    
	
	</script>
  </head>
  
  <body>
			<form action="${pageContext.request.contextPath }/admin/img_Imgupload.action" method="post" enctype="multipart/form-data">
				<table class="table">
					<tr>
						<td>图片的名字</td>
						<td>对应的图片</td>
						<td>图片的描述</td>
						<td>操作</td>
					</tr>
					<s:iterator value="imglist" status="st">
						<tr>
							<td><s:property value="name"/></td>
							<td><img width="200px" height="200px" src="http://o7kl8ob0l.bkt.clouddn.com/<s:property value='path' />"></td>
							<td><s:property value="content"/></td>
							<td><a href="javascript:doEditor('<s:property value='id'/>')">编辑</a>&nbsp;<a href="javascript:doDelete('<s:property value='id'/>')">删除</a></td>
						</tr>
					
					</s:iterator>
				
				</table>
				<h1 align="center">上传图片</h1>
				<table class="table">
					
					<tr>
						<td>图片的名字</td>
						<td><input type="text" name="imgname"></td>
					</tr>
					<tr>
						<td>请选择你要上传的图片</td>
						<td><input type="file" name="pageImg"/></td>
					</tr>
					<tr>
						<td>该图片的描述</td>
						<td><textarea rows="10px" cols="10px" name="pageContext"></textarea></td>
					</tr>
					<tr>
						<td><input type="submit" value="上传"/></td>
					</tr>
				
				</table>
			</form>
		
		</div>
  </body>
</html>
